package com.yixia.system.service.impl.system;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yixia.common.utils.page.PageBean;
import com.yixia.system.domain.system.SysOperLog;
import com.yixia.system.mapper.system.SysOperLogMapper;
import com.yixia.system.service.system.SysOperLogService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 35038
* @description 针对表【sys_oper_log(操作日志记录)】的数据库操作Service实现
* @createDate 2023-08-03 09:23:50
*/
@Service
public class SysOperLogServiceImpl extends ServiceImpl<SysOperLogMapper, SysOperLog>
    implements SysOperLogService {

    @Autowired
    private SysOperLogMapper operLogMapper;

    /**
     * 添加日志信息
     * @param operLog 操作日志对象
     */
    @Override
    public void insertOperlog(SysOperLog operLog) {
        int insert = operLogMapper.insertOperlog(operLog);
        int row = insert;
    }

    @Override
    public Page<SysOperLog> selectOperLogListPage(PageBean pageBean, SysOperLog operLog)
    {
        // 封装page对象
        Page<SysOperLog> page = new Page<>(pageBean.getPageNum(), pageBean.getPageSize());



        // 进行条件查询
        return operLogMapper.selectOperLogListPage(page, operLog);
    }



    /**
     * 通过pageHeper来进行分页查询
     * @param operLog
     * @return
     */
    public  List<SysOperLog> selectOperLogList(SysOperLog operLog){
        return operLogMapper.selectOperLogList(operLog);
    }

}




